package com.daye.homework.dao;

import com.daye.homework.bean.Student;

import java.sql.SQLException;
import java.util.List;

public interface AdminDao {
    /**
     * 管理员登录
     * @param username
     * @param password
     * @return
     */
    boolean findAdmin(String username, String password);

    /**
     * 添加学生
     * @param student
     */
    void insertStudent(Student student) throws SQLException;

    /**
     * 遍历所有学生
     * @return
     */
    List<Student> selectAllStudent() throws SQLException;

    /**
     * 根据id删除学生
     * @param id
     */
    void removeStudentById(Integer id) throws SQLException;

    /**
     * 根据学员id找到学员
     * @param id
     * @return
     */
    Student selectStudentById(int id) throws SQLException;

    /**
     * 根据id修改学员信息
     * @param student
     */
    void updateStudentById(Student student) throws SQLException;
}
